<div class="subnav">
    <ul class="crumbs">
        <li>我的位置：</li>
        <li><a href="{$site_url}">{$site_name} </a> </li>
        <li><a href="{$Categorys[$catid]['url']}">&nbsp; &gt; {$Categorys[$catid]['catname']} </a></li>
         <li><a href="index.php?g=Home&m=Zforum_theme&a=forumlist&id=7&plateid={$plate['id']}">&nbsp; &gt; {$plate['name']} </a></li>
        <div class="clear"></div>
    </ul>
 
</div>
<link rel="stylesheet" href="./Public/Js/Kindeditor/themes/default/default.css" />
<script charset="utf-8" src="./Public/Js/Kindeditor/lang/zh_CN.js"></script>
<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
					allowFileManager : true,
					uploadJson : "index.php?g=User&m=Upload&a=index",//图片上传后的处理地址
					width : '1200px',
					height: '400px',
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'emoticons', 'image']
				});
				
			});
		</script>

<div class="main">
<form action="index.php?g=Home&m=Zforum_theme&a=insert" method="post"  >
    <input  type="hidden" name="plateid" value="{$plate['id']}" />
   <div style="width:1200px; margin-top:20px;"><input id="title" style=" width:100%; height:30px; border:#CCC solid 1px;"  name="title" placeholder="   标题"/></div>
    <div id="tishi" style="color:#F00"></div>
     
   <div style=" margin-top:20px;"><textarea id="content1" name="content" style="width:700px;height:200px;visibility:hidden;"></textarea>
   </div>

 <div style="width:1200px; height:50px; margin-top:20px;  ">
   <input style=" float:right; width:100px; height:30px;background:#604328; color:#FFF; border: #FFF solid 0px;" type="submit"   value="发布帖子"/>
 </div>
    </form>   
</div>

<script>
$("#title").keyup(function(){
var title=$("#title").val();

var len = 0; 
for (var i = 0; i < title.length; i++) { 
if (title[i].match(/[^\x00-\xff]/ig) != null) //全角 
len += 2; 
else 
len += 1; 
} 
if(len>48){
	var t=getByteVal(title,60)
	var ll=Math.ceil((60-len)/2);
	$("#title").val(t);
	$("#tishi").html('还可输入'+ll+'个字');
	}else{
		$("#tishi").html(' ');
		}

//do something


function getByteVal(val, max) { 
var returnValue = ''; 
var byteValLen = 0; 
for (var i = 0; i < val.length; i++) { 
if (val[i].match(/[^\x00-\xff]/ig) != null) 
byteValLen += 2; 
else 
byteValLen += 1; 
if (byteValLen > max) 
break; 
returnValue += val[i]; 
} 
return returnValue; 
} 

});
</script>




                                                                                                                                                                                                                                                                                                                                                                                                                                                